<?php
//ob_start("ob_gzhandler");
// webboard stats
//
// digiboard by digitalboom.org
// http://www.digitalboom.org
//
// Information Technology program
// Sirindhorn International Institute of Technology
// Thammasat University, Rangsit Campus
// http://www.siit.tu.ac.th
//
// authors: hoho, bact'
// first created on: 2003 May 09
// last modified on: 2003 May 09
// last modified by: bact'

//use session to count currently online 'guest' 
session_start();
$SID = session_id();

include("settings/config.inc.php");
include("settings/accounts.inc.php");
include("settings/forum.inc.php");
include("lib/util.inc.php");
include("lib/users_function.inc.php");
include("lib/list_util.inc.php");

global $DGB;

extract($_POST);
extract($_GET);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$DGB["ENCODING"];?>">
<meta http-equiv="Pragma" content="no-cache">
<title><?=$DGB["WEBBOARD_NAME"];?> / Statistics</title>
<link rel="stylesheet" href="<?=$DGB["STYLESHEET"];?>" type="text/css">
</head>

<body bgcolor="#FFFFEE">
<br>
<? if ($DGB["BOARD_STATS"] == true) {?>
 <? if ($DGB["ENABLE_LOGIN"] == true) { ?>
 &nbsp;Registered Members:
 <b><? $TotalMembers = AllBoardsStats($DGB["DB_USERS_TABLE"]);
  echo $TotalMembers1 = number_format($TotalMembers, 0, '.', ',');?></b>
  <br>
 <?}?>
 &nbsp;Total Topics:
 <b><? $TotalTopic = AllBoardsStats($DGB["DB_TOPICS_TABLE"]);
 echo $TotalTopic1 = number_format($TotalTopic, 0, '.', ',');?></b>
 <br>
 &nbsp;Total Answers:
 <b><? $TotalPosts = AllBoardsStats($DGB["DB_ANSWERS_TABLE"]);
 echo $TotalPosts1 = number_format($TotalPosts, 0, '.', ',');?></b>
<?} else {?>
 &nbsp;No statistics available.
<?}?>
 <br>
</body>
</html>
